<div class="page page-form" data-ng-controller="addMenu">
    <div class="panel panel-default">
        <div class="panel-heading"><strong><span
                class="glyphicon glyphicon-th"></span>&nbsp;&nbsp;&nbsp;&nbsp;添加菜单</strong></div>
        <div class="panel-body" data-ng-controller="signupCtrl">
            <div class="form-group has-error has-feedback input-lg" style="height:30px;text-align: center;"><label
                    data-ng-hide="isHidePer" class="control-label">添 加 失 败</label></div>
            <form name="menuFormInvalid" style="margin-left: 5%;" name="form_signup"
                  class="col-md-11 form-horizontal form-validation" data-ng-submit="addPer()">
                <div class="form-group">
                    <div class="col-sm-1" style="text-align: right;">
                        <label>标题</label>
                    </div>
                    <div class="col-sm-4">
                        <input type="text"
                               class="form-control"
                               data-ng-model="perForm.title"
                               placeholder="不能为空"
                               required>
                    </div>
                    <div class="col-sm-1"></div>
                    <div class="col-sm-1" style="text-align: right;">
                        <label>图标</label>
                    </div>
                    <div class="col-sm-4">
                        <input type="text"
                               class="form-control"
                               data-ng-model="perForm.icon"
                                >
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-1" style="text-align: right;">
                        <label>路径</label>
                    </div>
                    <div class="col-sm-4">
                        <input type="text"
                               class="form-control"
                               placeholder="不能为空"
                               data-ng-model="perForm.url"
                               required>
                    </div>
                    <div class="col-sm-1"></div>
                    <div class="col-sm-1" style="text-align: right;">
                        <label>上级菜单</label>
                    </div>
                    <div class="col-sm-4">
                        <select id="parentMenu" data-ng-model="perForm.parentId" class="col-sm-12"
                                style="font-size: 15px;height: 35px;"
                                data-ng-options="m.id as m.title for m in item">
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-1" style="text-align: right;">
                        <label>所属模块</label>
                    </div>
                    <div class="col-sm-4">
                        <input type="text"
                               class="form-control"
                               data-ng-model="perForm.moduleName"
                                >
                    </div>
                    <div class="col-sm-1"></div>
                    <div class="col-sm-1" style="text-align: right;">
                        <label>备注</label>
                    </div>
                    <div class="col-sm-4">
                        <input type="text"
                               class="form-control"
                               data-ng-model="perForm.remark"
                                >
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-1">
                    </div>
                    <div class="col-sm-4">
                        <button type="submit" data-ng-disabled="menuFormInvalid.$invalid"
                                class="btn btn-info btn-block btn-lg"
                                >保存
                        </button>
                    </div>
                </div>
                <br/>
            </form>
            <table class="table table-bordered table-responsive table-striped">
                <thead>
                <tr style="display:block;">
                    <th style="width: 60px;">图标</th>
                    <th style="width: 200px;">标题</th>
                    <th style="width: 300px;">路径</th>
                    <th style="width: 190px;">上级菜单</th>
                    <th style="width: 150px;">所属模块</th>
                    <th style="width: 230px;">备注</th>
                    <th style="width: 120px;">操作</th>
                </tr>
                </thead>
                <tbody style="display: block;height: 450px;overflow: auto;">
                    <tr data-ng-repeat="info in menu">
                        <td style="width: 60px;"><i class="fa {{info.icon}}"></i></td>
                        <td style="width: 200px;">{{info.title}}</td>
                        <td style="width: 300px;">{{info.url}}</td>
                        <td style="width: 190px;">{{info.parentName}}</td>
                        <td style="width: 150px;">{{info.moduleName}}</td>
                        <td style="width: 230px;">{{info.remark}}</td>
                        <td style="width: 105px;"><a style="color:#ff9d33;" data-ng-click="updatePer(info)" href="">修改</a>
                            &nbsp;&nbsp;&nbsp;&nbsp;<a style="color:#ff9d33;" data-ng-click="delPer(info.id)" href="">删除</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>